import { requests } from './request'

export const getLogin = (data) => {
  return requests({
    url: '/login',
    method: 'post',
    data: data
  })
}

export const getRegister = (data) => {
  return requests({
    url: '/register',
    method: 'post',
    data: data
  })
}

export const getImgCode = () => {
  return requests({
    url: '/captchaImage',
    method: 'get',
  })
}

export const getHotelList = (data) => {
  return requests({
    url: '/system/hotel/front/list',
    method: 'get',
    params: data
  })
}

export const getHotelDetailsList = (data) => {
  return requests({
    url: '/system/hotel/front/details/' + data,
    method: 'get',
  })
}

export const getCommentList = (data) => {
  return requests({
    url: '/system/comment/front/list',
    method: 'get',
    params: data
  })
}

export const getFeaturesList = (data) => {
  return requests({
    url: '/system/features/front/list',
    method: 'get',
    params: data
  })
}

export const getUserInfo = () => {
  return requests({
    url: '/getInfo',
    method: 'get',
  })
}

export const getOrderList = (data) => {
  return requests({
    url: '/system/order/front/list',
    method: 'get',
    params: data
  })
}

export const getCollectList = (data) => {
  return requests({
    url: '/system/collect/front/list',
    method: 'get',
    params: data
  })
}

export const getCommentSubmit = (data) => {
  return requests({
    url: '/system/comment/front/add',
    method: 'post',
    data: data
  })
}

export const getCollectAdd = (data) => {
  return requests({
    url: '/system/collect/front/add',
    method: 'post',
    data: data
  })
}

export const getCollectDelete = (data) => {
  return requests({
    url: '/system/collect/front/delete/' + data,
    method: 'delete',
  })
}

export const getUserSubmit = (data) => {
  return requests({
    url: '/system/user/front/edit',
    method: 'put',
    data: data
  })
}

export const getOrderAdd = (data) => {
  return requests({
    url: '/system/order/front/add',
    method: 'post',
    data: data
  })
}


export const getOrderEdit = (data) => {
  return requests({
    url: '/system/order/front/edit',
    method: 'put',
    data: data
  })
}

export const getLogout = (data) => {
  return requests({
    url: '/logout',
    method: 'post',
    data: data
  })
}

export const getNoticeList = (data) => {
  return requests({
    url: '/system/notice/front/list',
    method: 'get',
    params: data
  })
}

export const getMessageList = (data) => {
  return requests({
    url: '/system/message/front/list',
    method: 'get',
    params: data
  })
}


export const submitMessage = (data) => {
  return requests({
    url: '/system/message/front/submit',
    method: 'post',
    data: data
  })
}
